#pragma once
#include <d3dx9.h>
#include "Node.h"

class Camera: public Node
{
	D3DXMATRIX projection;
	float nearPlane;
	float farPlane;
	D3DXPLANE p;
public:
	Camera( int width, int height )
	{
		//D3DXMatrixPerspectiveLH(&projection,(float)width,(float)height, 1.0f, 1000.0f);
		D3DXMatrixPerspectiveFovLH( &projection, D3DX_PI * 0.25f, (float)width/(float)height, 1.f, 1000.f);
	}

	void SetRange(float near, float far);

	D3DXMATRIX GetTransform()
	{
		D3DXMATRIX out;
		D3DXMatrixInverse(&out,0,&transform);
		return out;
	}

	D3DXMATRIX GetProjection()
	{
		return projection;
	}
};